home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / gnu / gnulib / ohlutil / makefile < prev    next >
Encoding:
Makefile  |  1990-08-24  |  7.5 KB  |  216 lines

  1. # Makefile for fileutils
  2. # Copyright (C) 1986, 1988, 1989 Free Software Foundation, Inc.
  3.  
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 1, or (at your option)
  7. # any later version.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the
  12. # GNU General Public License for more details.
  13.  
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18. # MS-DOS port (c) 1990 by Thorsten Ohl, td12@ddagsi3.bitnet
  19. #
  20. # To this port, the same copying conditions apply as to the
  21. # original release.
  22. #
  23. # IMPORTANT:
  24. # This file is not identical to the original GNU release!
  25. # You should have received this code as patch to the official
  26. # GNU release.
  27. #
  28. # MORE IMPORTANT:
  29. # This port comes with ABSOLUTELY NO WARRANTY.
  30. #
  31. # $Header: e:/gnu/fileutil/RCS/makefile.'v 1.3.0.6 90/06/29 00:50:58 tho Stable $
  32. #
  33. # This makefile is tailored for an **IX compatible make and the
  34. # Microsoft C Compiler Version 5.1.
  35.  
  36. CC = cl
  37. LINK = link
  38.  
  39. # Things you might add to CFLAGS:
  40. # -DSTDC_HEADERS    If you have ANSI C headers and libraries.
  41. # -D_POSIX_SOURCE    If you have POSIX.1 headers and libraries.
  42. # -DSIGTYPE=int     If your signal handlers return int, not void.
  43. # -DUSG         System V strings, headers, ndir.h.
  44. # -DDIRENT        If you have dirent.h.
  45. # -DSYSNDIR        Old Xenix systems (selects sys/ndir.h).
  46. # -DINT_16_BITS     On machines where sizeof long > sizeof int.
  47. # -DHPUX_NFS_BUG    On HP/UX (6.5 at least) where NFS files have
  48. #            reported blocksizes twice the correct size.
  49. # -DVPRINTF_MISSING    If you lack vprintf function (but have _doprnt).
  50. # -DMKDIR_MISSING    If you lack mkdir and rmdir system calls.
  51. # -DFCHMOD_MISSING    If you lack fchmod system call.
  52. # -DRENAME_MISSING    If you lack rename system call.
  53. # -DFTRUNCATE_MISSING    If you lack ftruncate system call.
  54. # -DSTBLOCKS_MISSING    If your `struct stat' lacks st_blocks and st_blksize.
  55.  
  56. # For System V, add -DUSG to CFLAGS, and -DBLKSIZE=1024
  57. # (or some other number which is the optimal blocksize for filesys i/o ops).
  58. # On V.3, add -DUSGr3 as well (this selects dirent.h instead of ndir.h).
  59. # Add -DSYSNDIR if your system uses sys/ndir.h instead of ndir.h.
  60. # On HP/UX, add -DDIRSIZ_MACRO (for ndir.h).
  61. # Add -DNEED_MKDIR if your system lacks the mkdir and rmdir system calls.
  62. # Add -DVPRINTF to use vfprintf instead of _doprnt (which seems to be
  63. # broken on the sparc).
  64.  
  65. INSTALL = cp -v
  66.  
  67. CFLAGS    = -Ox -DUSG -DBLKSIZE=0x4000 -DVPRINTF -W3 -DUTIMES_MISSING\
  68.       -DFCHMOD_MISSING -DSTDC_HEADERS -DINT_16_BITS
  69. LDFLAGS = /e/noe
  70. SSTACK    = /st:0x4000
  71. BSTACK    = /st:0x8000
  72. LIBOBJS = getopt.obj getopt1.obj
  73. LIBS    = $(LIBOBJS:.obj=) e:\libs\msc\setargv
  74. DIRLIB    = msd_dir.obj
  75. PWDLIB    = msd_pwd.obj
  76.  
  77. # Where to install the executables
  78. BIN    = c:/bin
  79.  
  80. # Executable files in this directory
  81. PROGS    = cat.exe cmp.exe dd.exe head.exe tail.exe ls.exe rm.exe cp.exe \
  82.       mv.exe mkdir.exe rmdir.exe chmod.exe tac.exe
  83.  
  84. # one of these is enough: ls.exe vdir.exe dir.exe
  85. # makes no ense under MS-DOS: ln.exe mkfifo.exe
  86. # We did not try the following yet: create.exe ginstall.exe du.exe
  87.  
  88. # Sources
  89. SRC   = argmatch.c backupfi.c cat.c chmod.c cmp.c cp-aux.c cp-hash.c cp.c \
  90.     create.c dd.c dirlib.c du.c eaccess.c error.c filebloc.c \
  91.     filemode.c getopt.c getopt1.c getversi.c glob.c head.c install.c \
  92.     ln.c ls.c mkdir.c mkfifo.c modechan.c msd_dir.c msd_pwd.c mv.c \
  93.     mv_dir.c regex.c rm.c rmdir.c savedir.c tac.c tail.c \
  94.  
  95. INC   = backupfi.h cp.h getopt.h modechan.h msd_dir.h msd_pwd.h regex.h \
  96.     system.h
  97.  
  98. # Version of fileutils release
  99. VERSION = 1.3
  100.  
  101. all: $(PROGS)
  102.  
  103. $(PROGS): $(LIBOBJS)
  104.  
  105. # Linking rules
  106.  
  107. cat.exe: cat.obj error.obj $(LIBOBJS)
  108.     $(LINK) $(LDFLAGS) $(BSTACK) cat error $(LIBS), $@;
  109.  
  110. chmod.exe: chmod.obj modechan.obj filemode.obj error.obj savedir.obj \
  111.     $(DIRLIB) $(LIBOBJS)
  112.     $(LINK) $(LDFLAGS) $(BSTACK) chmod modechan filemode error savedir \
  113.          $(DIRLIB) $(LIBS), $@;
  114.  
  115. cmp.exe: cmp.obj error.obj $(LIBOBJS)
  116.     $(LINK) $(LDFLAGS) $(SSTACK) cmp error $(LIBS), $@;
  117.  
  118. cp.exe: cp.obj cp-hash.obj cp-aux.obj eaccess.obj error.obj backupfile.obj \
  119.     getversion.obj argmatch.obj savedir.obj $(DIRLIB) $(PWDLIB) $(LIBOBJS)
  120. #    $(LINK) $(LDFLAGS) $(BSTACK) cp cp-hash cp-aux eaccess \
  121. #        error backupfile getversion argmatch savedir \
  122. #        $(LIBS) $(DIRLIB) $(PWDLIB), $@;
  123.     $(LINK) @cp.lnk
  124. create.exe: create.obj modechange.obj dirlib.obj error.obj $(DIRLIB) $(LIBOBJS)
  125.     $(LINK) $(LDFLAGS) $(BSTACK) create modechange dirlib error
  126.         $(LIBS) $(DIRLIB), $@;
  127.  
  128. dd.exe: dd.obj error.obj
  129.     $(LINK) $(LDFLAGS) $(BSTACK) dd error, $@;
  130.  
  131. dir.exe: dir.obj filemode.obj glob.obj error.obj argmatch.obj fileblocks.obj \
  132.     $(DIRLIB) $(PWDLIB) $(LIBOBJS)
  133.     $(LINK) $(LDFLAGS) $(BSTACK) dir filemode glob error argmatch \
  134.         fileblocks $(LIBS) $(DIRLIB) $(PWDLIB), $@;
  135.  
  136. du.exe: du.c
  137.     $(CC) $(CFLAGS) -Fe$@ du.c $(LIBS) -link $(LDFLAGS) $(BSTACK)
  138.  
  139. ginstall: install.obj dirlib.obj error.obj $(LIBOBJS)
  140.     $(LINK) $(LDFLAGS) $(BSTACK) install dirlib error $(LIBS), $@;
  141.  
  142. head.exe: head.obj error.obj $(LIBOBJS)
  143.     $(LINK) $(LDFLAGS) $(BSTACK) head error $(LIBS), $@;
  144.  
  145. ln.exe: ln.c
  146.     $(CC) $(CFLAGS) -Fe$@ ln.c $(LIBS) -link $(LDFLAGS) $(BSTACK)
  147.  
  148. ls.exe: ls.obj filemode.obj glob.obj error.obj argmatch.obj fileblocks.obj \
  149.     $(DIRLIB) $(PWDLIB) $(LIBOBJS)
  150.     $(LINK) $(LDFLAGS) $(BSTACK) ls filemode glob error \
  151.         argmatch filebloc $(LIBS) $(DIRLIB) $(PWDLIB), ls.exe;
  152.  
  153. mkdir.exe: mkdir.obj error.obj $(LIBOBJS)
  154.     $(LINK) $(LDFLAGS) $(BSTACK) mkdir error $(LIBS), $@;
  155.  
  156. mv.exe: mv.obj eaccess.obj error.obj backupfile.obj getversion.obj \
  157.     argmatch.obj $(DIRLIB) $(PWDLIB) $(LIBOBJS)
  158. #    $(LINK) $(LDFLAGS) $(BSTACK) mv error eaccess backupfi getversi \
  159. #        argmatch $(DIRLIB) $(PWDLIB) $(LIBS), $@;
  160.     $(LINK) @mv.lnk
  161. rm.exe: rm.obj eaccess.obj error.obj $(DIRLIB) $(PWDLIB) $(LIBOBJS)
  162.     $(LINK) $(LDFLAGS) $(BSTACK) rm eaccess error \
  163.         $(LIBS) $(DIRLIB) $(PWDLIB), $@;
  164.  
  165. rmdir.exe: rmdir.obj error.obj $(LIBOBJS)
  166.     $(LINK) $(LDFLAGS) $(BSTACK) rmdir error $(LIBS), $@;
  167.  
  168. tac.exe: tac.obj error.obj regex.obj $(LIBOBJS)
  169.     $(LINK) $(LDFLAGS) $(BSTACK) tac error regex $(LIBS), $@;
  170.  
  171. tail.exe: tail.obj error.obj $(LIBOBJS)
  172.     $(LINK) $(LDFLAGS) $(BSTACK) tail error $(LIBS), $@;
  173.  
  174. vdir.exe: vdir.obj filemode.obj glob.obj error.obj argmatch.obj \
  175.     fileblocks.obj $(DIRLIB) $(PWDLIB) $(LIBOBJS)
  176.     $(LINK) $(LDFLAGS) $(BSTACK) vdir filemode glob error \
  177.         argmatch fileblocks $(LIBS) $(DIRLIB) $(PWDLIB), $@;
  178.  
  179. # Compilation rules
  180.  
  181. cat.obj chmod.obj: system.h
  182. chmod.obj create.obj mkdir.obj mkfifo.obj modechange.obj: modechange.h
  183. cp.obj mv.obj ln.obj backupfile.obj getversion.obj: backupfile.h
  184. eaccess.obj cp.obj cp-hash.obj cp-aux.obj: cp.h msd_pwd.h msd_dir.h
  185. tac.obj regex.obj: regex.h
  186. getopt1.obj: getopt.h
  187. head.obj: system.h msd_dir.h
  188.  
  189. msd_dir.obj system.h: msd_dir.h
  190. msd_pwd.obj: msd_pwd.h
  191.  
  192. dir.obj: ls.c
  193.     $(CC) $(CFLAGS) -DMULTI_COL -c ls.c
  194.     mv ls.obj dir.obj
  195.  
  196. vdir.obj: ls.c
  197.     $(CC) $(CFLAGS) -DLONG_FORMAT -c ls.c
  198.     mv ls.obj vdir.obj
  199.  
  200. install: $(PROGS)
  201.     $(INSTALL) $(PROGS) $(BIN)
  202.  
  203. clean:
  204.     del *.exe *.obj
  205.     rcsclean *.c *.h makefile
  206.  
  207. zip:
  208.     pkzip -frp fileutil
  209.  
  210. disk:
  211.     copy fileutil.zip b:/v
  212.     pkunzip -t b:fileutil | grep -vw OK
  213.  
  214. tags: $(SRC) $(INC)
  215.     etags -t *.h *.c
  216.